3.18 \(\int \frac {\tan ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx\)

Optimal. Leaf size=29 \[ \frac {\cot (x)}{\sqrt {a \csc ^2(x)}}+\frac {\csc (x) \sec (x)}{\sqrt {a \csc ^2(x)}} \]

[Out]

cot(x)/(a*csc(x)^2)^(1/2)+csc(x)*sec(x)/(a*csc(x)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {3657, 4125, 2590, 14} \[ \frac {\cot (x)}{\sqrt {a \csc ^2(x)}}+\frac {\csc (x) \sec (x)}{\sqrt {a \csc ^2(x)}} \]

Antiderivative was successfully verified.

[In]

Int[Tan[x]^2/Sqrt[a + a*Cot[x]^2],x]

[Out]

Cot[x]/Sqrt[a*Csc[x]^2] + (Csc[x]*Sec[x])/Sqrt[a*Csc[x]^2]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2590

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[f^(-1), Subst[Int[(1 - x^2
)^((m + n - 1)/2)/x^n, x], x, Cos[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n - 1)/2]

Rule 3657

Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*sec[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a, b]

Rule 4125

Int[(u_.)*((b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sec[e + f*x], x]}, Di
st[((b*ff^n)^IntPart[p]*(b*Sec[e + f*x]^n)^FracPart[p])/(Sec[e + f*x]/ff)^(n*FracPart[p]), Int[ActivateTrig[u]
*(Sec[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rubi steps

\begin {align*} \int \frac {\tan ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx &=\int \frac {\tan ^2(x)}{\sqrt {a \csc ^2(x)}} \, dx\\ &=\frac {\csc (x) \int \sin (x) \tan ^2(x) \, dx}{\sqrt {a \csc ^2(x)}}\\ &=-\frac {\csc (x) \operatorname {Subst}\left (\int \frac {1-x^2}{x^2} \, dx,x,\cos (x)\right )}{\sqrt {a \csc ^2(x)}}\\ &=-\frac {\csc (x) \operatorname {Subst}\left (\int \left (-1+\frac {1}{x^2}\right ) \, dx,x,\cos (x)\right )}{\sqrt {a \csc ^2(x)}}\\ &=\frac {\cot (x)}{\sqrt {a \csc ^2(x)}}+\frac {\csc (x) \sec (x)}{\sqrt {a \csc ^2(x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 19, normalized size = 0.66 \[ \frac {\cot (x)+\csc (x) \sec (x)}{\sqrt {a \csc ^2(x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[x]^2/Sqrt[a + a*Cot[x]^2],x]

[Out]

(Cot[x] + Csc[x]*Sec[x])/Sqrt[a*Csc[x]^2]

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 35, normalized size = 1.21 \[ \frac {{\left (\tan \relax (x)^{3} + 2 \, \tan \relax (x)\right )} \sqrt {\frac {a \tan \relax (x)^{2} + a}{\tan \relax (x)^{2}}}}{a \tan \relax (x)^{2} + a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)^2/(a+a*cot(x)^2)^(1/2),x, algorithm="fricas")

[Out]

(tan(x)^3 + 2*tan(x))*sqrt((a*tan(x)^2 + a)/tan(x)^2)/(a*tan(x)^2 + a)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)^2/(a+a*cot(x)^2)^(1/2),x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

maple [A]  time = 0.57, size = 33, normalized size = 1.14 \[ \frac {\left (\sin ^{3}\relax (x )\right ) \sqrt {4}}{2 \sqrt {-\frac {a}{-1+\cos ^{2}\relax (x )}}\, \cos \relax (x ) \left (-1+\cos \relax (x )\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)^2/(a+a*cot(x)^2)^(1/2),x)

[Out]

1/2*sin(x)^3/(-1/(-1+cos(x)^2)*a)^(1/2)/cos(x)/(-1+cos(x))^2*4^(1/2)

________________________________________________________________________________________

maxima [A]  time = 0.52, size = 18, normalized size = 0.62 \[ \frac {\tan \relax (x)^{2} + 2}{\sqrt {\tan \relax (x)^{2} + 1} \sqrt {a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)^2/(a+a*cot(x)^2)^(1/2),x, algorithm="maxima")

[Out]

(tan(x)^2 + 2)/(sqrt(tan(x)^2 + 1)*sqrt(a))

________________________________________________________________________________________

mupad [B]  time = 0.73, size = 34, normalized size = 1.17 \[ \frac {{\mathrm {tan}\relax (x)}^3\,\sqrt {\frac {1}{{\mathrm {tan}\relax (x)}^2}}+2\,\mathrm {tan}\relax (x)\,\sqrt {\frac {1}{{\mathrm {tan}\relax (x)}^2}}}{\sqrt {a}\,\sqrt {{\mathrm {tan}\relax (x)}^2+1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)^2/(a + a*cot(x)^2)^(1/2),x)

[Out]

(tan(x)^3*(1/tan(x)^2)^(1/2) + 2*tan(x)*(1/tan(x)^2)^(1/2))/(a^(1/2)*(tan(x)^2 + 1)^(1/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tan ^{2}{\relax (x )}}{\sqrt {a \left (\cot ^{2}{\relax (x )} + 1\right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)**2/(a+a*cot(x)**2)**(1/2),x)

[Out]

Integral(tan(x)**2/sqrt(a*(cot(x)**2 + 1)), x)

________________________________________________________________________________________